import request from '@/utils/request'

/**
 * 条件分页查询留言数据
 * @param {*} query 
 * @returns 
 */
export const getWallListService = (query) => {
    return request.get('/admin/wall/page', {
        params: query
    })
}

/**
 * 批量删除留言数据
 * @param {*} ids 
 * @returns 
 */
export const deleteWallBatchService = (ids) => {
    return request.delete('/admin/wall', {
        data: ids
    })
}

/**
 * 根据id查询留言数据
 * @param {*} id 
 * @returns 
 */
export const getWallByIdService = (id) => {
    return request.get(`/admin/wall/${id}`)
}

/**
 * 修改留言状态
 * @param {*} query 
 * @returns 
 */
export const updateWallStatusService = (query) => {
    return request.put('/admin/wall/status', query)
}

/**
 * 查询留言背景色
 */
export const getWallBackgroundService = () => {
    return request.get('/admin/wall/bgc')
}

/**
 * 新增留言背景色
 * @param {*} query 
 * @returns 
 */
export const addWallBgcService = (query) => {
    return request.post('/admin/wall/add/bgc', query)
}